import React from 'react';
import Index from './layout/Index'
import Login from './vuews/login/Index'
// HashRouter, BrowserRouter
import { HashRouter, Switch, Route } from 'react-router-dom'

const App = () => {
  return (
    <HashRouter>
      {/* V6 路由配置 */}
      {/* <Routes>
      <React path='/' element={<Index />} ></React>
      </Routes> */}

      {/* V5 路由配置 */}
      <Switch>
        {/* exact: 配置精确匹配路由，防止 login 会进入 首页 */}
        <Route exact path='/login' component={Login} ></Route>

        <Route path='/' component={Index} ></Route>
      </Switch>

    </HashRouter>
  );
};

export default App;
